//获取项目根路径
function getRootPath(){
    var pathName = window.location.pathname.substring(1);
    var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
    return window.location.protocol + '//' + window.location.host + '/'+ webName + '/';
}
// 全局根路径
var wwwroot=getRootPath();
console.info(wwwroot);
